<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
</head>
<body>

<h1>学生数据展示：</h1>
<hr>
<table class="layui-table">
      <thead>
      <tr>
          <th>学生姓名</th>
          <th>性别</th>
          <th>年龄</th>
          <th>所有班级</th>
          <th>注册事件</th>
      </tr>
      </thead>
      <tbody>
         <!-- <tr th:each="stu:${stus}">
              <th th:text="${stu.name}">学生姓名</th>
              <th th:text="${stu.gender}">性别</th>
              <th th:text="${stu.age>=18?'已成年':'未成年'}" ></th>
              <th th:text="${stu.classeBean.name}">所有班级</th>
          </tr>-->
          <!--           -->
         <tr th:each="stu:${stus}">
             <div th:object="${stu}">
<!--
                 <th th:text="*{#strings.substring(name,0,1).toUpperCase()+#strings.substring(name,1)}">学生姓名</th>
-->
                 <th th:text="|*{#strings.substring(name,0,1).toUpperCase()}*{#strings.substring(name,1)}|">学生姓名</th>
                 <th th:text="*{gender}">性别</th>
                 <th th:text="*{age>=18?'已成年':'未成年'}" ></th>
                 <th th:text="*{classeBean.name}">所有班级</th>
                 <th th:text="*{#temporals.format(joinTime,'yyyy年MM月dd日')}">所有班级</th>
             </div>

      </tbody>
</table>

</body>
</html>